import Vue from 'vue'
import VueRouter from 'vue-router'
import AdminLogin from "@/views/AdminLogin";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: AdminLogin
  },
  {
    path: '/admin',
    redirect:'admin/index',
    component: () => import('../views/admin-main'),
    children: [
      {
        path: 'list',
        component: ()=> import('../components/admin-list'),
      },
      {
        path: 'add',
        component: () => import('../components/admin_add')
      },
      {
        path: 'update',
        component: () => import('../components/admin-update'),
      },
      {
        path: 'user/list',
       component: () => import('../components/user-list'),
      },
      {
        path: 'vegetable/list',
        component: () => import('../components/admin-shopping'),
      },
      {
        path: 'vegetable/add',
        component: () => import('../components/product-add')
      },
      {
        path:'work/list-by-work',
        component:() => import('../components/work-list')
      },
      {
        path: 'work/give',
        component:() => import('../components/give-work')
      },
      {
        path:'qr/show',
        component:() =>import('../components/QrShow')
      },
      {
        path: 'volunteer/volunteerList',
        component:() =>import('../components/volunteerList')
      },
      {
        path:'volunteer/volunteerApply',
        component:() =>import('../components/volunteerApply')
      },
      {
        path: 'notice/add',
        component:() =>import('../components/notice_add')
      },
      {
        path: 'notice/list',
        component:() => import ('../components/notice_list')
      },
      {
        path: 'sign/list',
        component:() => import('../components/sigin_in_list')
      },
      {
        path: 'out/check/list',
        component:() => import('../components/out_checkList')
      },
      {
        path: 'out/list',
        component:() => import('../components/out_list')
      },
      {
        path: 'select/all',
        component:() => import('../components/nucleicacid-select-all-list')
      },
      {
        path: 'order/list',
        component:() => import('../components/order_list')
      },
      {
        path: 'index',
        component:() => import('../components/admin-index')
      }



    ]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
